package cn.netjava.personblogaction;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.netjava.actioninterface.Action;
import cn.netjava.dao.MsgDao;
import cn.netjava.dao.ReplayMsgDao;
import cn.netjava.pojo.Msg;

/**
 * this action is use for dealing with message
 * @author Administrator
 *
 */
public class PersonMsgAction implements Action{

	public String excute(HttpServletRequest request,
			HttpServletResponse response) {
		
		int uid =Integer.parseInt(request.getParameter("uid"));
		
		MsgDao mdao =MsgDao.getMsgDao();
		List<Msg> msgList =mdao.getUserMsgFromUserID(uid);
		request.setAttribute("usermsglist", msgList);
		
		ReplayMsgDao rmdao =ReplayMsgDao.getReplayMsgDao();
		rmdao.getReplayMsgFromMsgID(1);
		
		return "JSP/personblogjsp/personmsg.jsp?uid="+uid;
	}

}
